package com.anycl.design.j2ee.interceptingfilter.instance;

/**
 * 过滤管理器
 */
public class FilterManager {
    private FilterChain filterChain = new DefaultFilterChain();

    public FilterManager(TargetResource target) {
        this.filterChain.setTarget(target);
    }

    public void addFilter(Filter filter) {
        this.filterChain.addFilter(filter);
    }

    // 过滤器入口
    public void filterRequest() {
        this.filterChain.execute();
    }
}
